<template>
	<view class="box">
		<text>{{modeList[mode-1]}}</text>
		<text style="margin-left: 30rpx;">{{statusList[status-1]}}</text>
		<text v-if="status===2">({{duration}})</text>
	</view>
</template>

<script>
	export default {
		props: {
			mode: {
				type: Number,
				required: true
			},
			duration: {
				type: String,
				default: ''
			},
			status: {
				type: Number,
				required: true
			},
		},
		data() {
			return {
				modeList: ['语音聊天', '视频聊天'],
				statusList: ['通话中', '已结束', '已拒绝', '对方忙线中']
			}
		},
		methods: {}
	}
</script>

<style lang="scss">
	.box {
		position: relative;
		max-width: calc(100vw - 240rpx);
		padding: 10px 20rpx;
		background-color: #ffffff;
		border-radius: 4px;
		// box-shadow: 1px 1px 1px 1px #f5f5f5;
		box-sizing: border-box;

		&::after {
			content: "";
			position: absolute;
			top: 14px;
			width: 10px;
			height: 10px;
			transform: rotate(45deg);
			left: -6px;
			background-color: inherit;
		}
	}
</style>
